package cn.lzy.smileconfig;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration //注解标识当前类就是自定义配置类
public class MyConfig {

    @Bean("myProperties1")//将返回值对象作为组件添加到spring容器中，若没有标识id号则该组
    //件id默认是方法名，而当前的id号是xml
    public MyProperties getMyproperties(){

        return new MyProperties();
    }
}
